import com.genexus.*;
import com.genexus.ui.*;

public final class subwvisprsn40 extends GXSubfileElement
{
   private String PrsCod ;
   private byte PrsTlfCod ;
   private int PrsPreTlf ;
   private String PrsNroTlf ;
   private int PrsAnxTlf ;
   private byte PrsFlgMov ;
   public String getPrsCod( )
   {
      return PrsCod ;
   }

   public void setPrsCod( String value )
   {
      PrsCod = value;
   }

   public byte getPrsTlfCod( )
   {
      return PrsTlfCod ;
   }

   public void setPrsTlfCod( byte value )
   {
      PrsTlfCod = value;
   }

   public int getPrsPreTlf( )
   {
      return PrsPreTlf ;
   }

   public void setPrsPreTlf( int value )
   {
      PrsPreTlf = value;
   }

   public String getPrsNroTlf( )
   {
      return PrsNroTlf ;
   }

   public void setPrsNroTlf( String value )
   {
      PrsNroTlf = value;
   }

   public int getPrsAnxTlf( )
   {
      return PrsAnxTlf ;
   }

   public void setPrsAnxTlf( int value )
   {
      PrsAnxTlf = value;
   }

   public byte getPrsFlgMov( )
   {
      return PrsFlgMov ;
   }

   public void setPrsFlgMov( byte value )
   {
      PrsFlgMov = value;
   }

   public void clear( )
   {
      PrsCod = "" ;
      PrsTlfCod = 0 ;
      PrsPreTlf = 0 ;
      PrsNroTlf = "" ;
      PrsAnxTlf = 0 ;
      PrsFlgMov = 0 ;
   }

   public int compareTo( GXSubfileElement element ,
                         int column )
   {
      switch (column)
      {
            case 0 :
               return GXutil.strcmp( GXutil.upper( PrsCod ), GXutil.upper( ((subwvisprsn40) element).getPrsCod() ));
            case 1 :
               if ( PrsTlfCod > ((subwvisprsn40) element).getPrsTlfCod() ) return 1;
               if ( PrsTlfCod < ((subwvisprsn40) element).getPrsTlfCod() ) return -1;
               return 0;
            case 2 :
               if ( PrsPreTlf > ((subwvisprsn40) element).getPrsPreTlf() ) return 1;
               if ( PrsPreTlf < ((subwvisprsn40) element).getPrsPreTlf() ) return -1;
               return 0;
            case 3 :
               return GXutil.strcmp( GXutil.upper( PrsNroTlf ), GXutil.upper( ((subwvisprsn40) element).getPrsNroTlf() ));
            case 4 :
               if ( PrsAnxTlf > ((subwvisprsn40) element).getPrsAnxTlf() ) return 1;
               if ( PrsAnxTlf < ((subwvisprsn40) element).getPrsAnxTlf() ) return -1;
               return 0;
            case 5 :
               if ( PrsFlgMov > ((subwvisprsn40) element).getPrsFlgMov() ) return 1;
               if ( PrsFlgMov < ((subwvisprsn40) element).getPrsFlgMov() ) return -1;
               return 0;
      }
      return 0;
   }

   public boolean isEmpty( )
   {
      return ( ( GXutil.strcmp(PrsCod, "") == 0 ) && ( PrsTlfCod == 0 ) && ( PrsPreTlf == 0 ) && ( GXutil.strcmp(PrsNroTlf, "") == 0 ) && ( PrsAnxTlf == 0 ) && ( PrsFlgMov == 0 ) )  ;
   }

   public void setColumn( GXComponent cell ,
                          int field )
   {
      switch (field) {
         case 0 :
            cell.setValue( PrsCod );
            break;
         case 1 :
            cell.setValue( PrsTlfCod );
            break;
         case 2 :
            cell.setValue( PrsPreTlf );
            break;
         case 3 :
            cell.setValue( PrsNroTlf );
            break;
         case 4 :
            cell.setValue( PrsAnxTlf );
            break;
         case 5 :
            cell.setValue( PrsFlgMov );
            break;
      }
   }

   public boolean isFieldChanged( GXComponent cell ,
                                  int field )
   {
      switch (field) {
         case 0 :
            return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsCod) == 0) );
         case 1 :
            return ( (((GUIObjectByte) cell).getValue() == PrsTlfCod) );
         case 2 :
            return ( (((GUIObjectInt) cell).getValue() == PrsPreTlf) );
         case 3 :
            return ( ( GXutil.strcmp(((GUIObjectString) cell).getValue(),PrsNroTlf) == 0) );
         case 4 :
            return ( (((GUIObjectInt) cell).getValue() == PrsAnxTlf) );
         case 5 :
            return ( (((GUIObjectByte) cell).getValue() == PrsFlgMov) );
      }
      return false;
   }

   public void setField( int i ,
                         GXComponent value )
   {
      switch (i)
      {
            case 0 :
               PrsCod = value.getStringValue() ;
               break;
            case 1 :
               PrsTlfCod = value.getByteValue() ;
               break;
            case 2 :
               PrsPreTlf = value.getIntValue() ;
               break;
            case 3 :
               PrsNroTlf = value.getStringValue() ;
               break;
            case 4 :
               PrsAnxTlf = value.getIntValue() ;
               break;
            case 5 :
               PrsFlgMov = value.getByteValue() ;
               break;
      }
   }

   public void setField( int i ,
                         GXSubfileElement element )
   {
      switch (i)
      {
            case 0 :
               PrsCod = ((subwvisprsn40) element).PrsCod;
               return;
            case 1 :
               PrsTlfCod = ((subwvisprsn40) element).PrsTlfCod;
               return;
            case 2 :
               PrsPreTlf = ((subwvisprsn40) element).PrsPreTlf;
               return;
            case 3 :
               PrsNroTlf = ((subwvisprsn40) element).PrsNroTlf;
               return;
            case 4 :
               PrsAnxTlf = ((subwvisprsn40) element).PrsAnxTlf;
               return;
            case 5 :
               PrsFlgMov = ((subwvisprsn40) element).PrsFlgMov;
               return;
      }
   }

}

